package com.great.domain;

import com.great.utils.DateUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * @author huangwenkai
 * @date 2021/10/14 14:51
 */
public class Order implements Serializable {

    private int order_id;
    private Integer product_id;
    private String user_id;
    private Integer num;
    private Double price;
    private Date create_time;
    private String create_timestr;
    private Product product;
    private String address;
    private int Status;
    private String phone;
    private String realname;

    public Order() {
    }

    public Order(int order_id, Integer product_id, String user_id, Integer num, Double price, Date create_time, String create_timestr, Product product, String address, int status, String phone, String realname) {
        this.order_id = order_id;
        this.product_id = product_id;
        this.user_id = user_id;
        this.num = num;
        this.price = price;
        this.create_time = create_time;
        this.create_timestr = create_timestr;
        this.product = product;
        this.address = address;
        Status = status;
        this.phone = phone;
        this.realname = realname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public int getOrder_id() {
        return order_id;
    }

    public String getCreate_timestr() {
        if(create_time!=null){
            create_timestr = DateUtils.date2String(create_time,"yyyy-MM-dd HH:mm:ss");
        }
        return create_timestr;
    }

    public void setCreate_timestr(String create_timestr) {
        this.create_timestr = create_timestr;
    }

    public void setOrder_id(int order_id) {
        this.order_id = order_id;
    }

    public Integer getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getStatus() {
        return Status;
    }

    public void setStatus(int status) {
        Status = status;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
